// Copyright (c) 2010 Manuel Peinado Gallego <manuel.peinado@gmail.com>
// Distributed under the MIT license

#include "NodeManager.h"

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

namespace
{
    void (NodeManager::*appendNodeFunc1)(ref<Node>) 
        = &NodeManager::append;
    void (NodeManager::*appendNodeFunc2)(Node* parent, ref<Node>) 
        = &NodeManager::append;
}

void pyInitNodeManager()
{
    bpy::class_<NodeManager, boost::noncopyable>("NodeManager", bpy::no_init)
    .def("append", appendNodeFunc1)
    .def("append", appendNodeFunc2)
    .def("getNodeByName", &NodeManager::getNodeByName,
         bpy::return_value_policy<bpy::reference_existing_object>())
	.def("remove", &NodeManager::remove)
	.def("removeBranch", &NodeManager::removeBranch)
	.def("removeChildren", &NodeManager::removeChildren)
    .def("clear", &NodeManager::clear)
    ;
}